package main

import (
	"log"

	"go-emacs-module"
)

func init() {
	if false {
		log.Println("fff")
	}
	goem.ModuleInit = ModuleInit
}

func ModuleInit(em goem.Module) int {
	goem.Set("hello-version", goem.MkStr("1.0"))
	f := goem.MkFunc(hello, "goem-hello", "isuserdata")
	goem.Fset("hello-hello", f)
	goem.Provide("hello")
	return 0
}

func hello(args []goem.Value, ud interface{}) goem.Value {
	log.Println("hello func called", ud)
	return goem.Value{}
}

func main() {}
